import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../css/main.dart';

import 'object2d.dart';

class YaxiView extends YaxiObject2d {
  YaxiView(CSSNodeData data) : super(data);

  @override
  Widget buildChild(BuildContext context, CSSNodeData data) {
    data.border = CSSBorder()
      ..top = (CSSBorderEdge()
        ..width = CSSSize.px(8)
        ..color = Colors.red
        ..style = CSSBorderStyle.solid)
      ..right = (CSSBorderEdge()
        ..width = CSSSize.px(4)
        ..color = Colors.blue
        ..style = CSSBorderStyle.dashed)
      ..bottom = (CSSBorderEdge()
        ..width = CSSSize.px(4)
        ..color = Colors.green
        ..style = CSSBorderStyle.dotted)
      ..left = (CSSBorderEdge()
        ..width = CSSSize.px(8)
        ..color = Colors.black
        ..style = CSSBorderStyle.solid);

    return CSSLayout(data);
  }
}
